using System;
using System.Data;
using System.Data.Common;

namespace SocialLearning.BusinessLayer
{
	/// <summary>
	/// The WrapperMode enum determines the behavior of
	/// the Wrapper class. That is the class is either
	/// a "wrapper" around the DbDataReader or
	/// it initializes its properties using the DbDataReader
	/// as a "data source"
	/// </summary>
	public enum WrapperMode { Wrapper, Dto }

	/// <summary>
	///This is the Base Class for all DbDataReader Wrappers
	/// </summary>
	public class BaseDbDataReaderWrapper
	{
		protected DbDataReader DbDataReader { get; private set; }
		protected WrapperMode Mode { get; private set; }

		public BaseDbDataReaderWrapper(DbDataReader dbDataReader, WrapperMode mode)
		{
			DbDataReader = dbDataReader;
			Mode = mode;
		}
	}

	#region [usp_get_t_assignment]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_assignment
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TAssignment : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 assignmentId;
		public Int32 AssignmentId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return assignmentId; default: return default(Int32); } } set { assignmentId = value; } }
		private Int32 subjectId;
		public Int32 SubjectId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (Int32)DbDataReader[1] : default(Int32); case WrapperMode.Dto: return subjectId; default: return default(Int32); } } set { subjectId = value; } }
		private Int32 total;
		public Int32 Total { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (Int32)DbDataReader[2] : default(Int32); case WrapperMode.Dto: return total; default: return default(Int32); } } set { total = value; } }
		private DateTime issueDate;
		public DateTime IssueDate { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (DateTime)DbDataReader[3] : default(DateTime); case WrapperMode.Dto: return issueDate; default: return default(DateTime); } } set { issueDate = value; } }
		private DateTime dueDate;
		public DateTime DueDate { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[4] != DBNull.Value) ? (DateTime)DbDataReader[4] : default(DateTime); case WrapperMode.Dto: return dueDate; default: return default(DateTime); } } set { dueDate = value; } }
		private String description;
		public String Description { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[5] != DBNull.Value) ? (String)DbDataReader[5] : default(String); case WrapperMode.Dto: return description; default: return default(String); } } set { description = value; } }

		#endregion Properties

		public TAssignment(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					assignmentId = (Int32)DbDataReader[0];
					subjectId = DbDataReader[1] != DBNull.Value ? (Int32)DbDataReader[1] : default(Int32);
					total = DbDataReader[2] != DBNull.Value ? (Int32)DbDataReader[2] : default(Int32);
					issueDate = DbDataReader[3] != DBNull.Value ? (DateTime)DbDataReader[3] : default(DateTime);
					dueDate = DbDataReader[4] != DBNull.Value ? (DateTime)DbDataReader[4] : default(DateTime);
					description = DbDataReader[5] != DBNull.Value ? (String)DbDataReader[5] : default(String);
					break;
			}
		}
	}

	#endregion [usp_get_t_assignment]

	#region [usp_get_t_chat_group]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_chat_group
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TChatGroup : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 groupId;
		public Int32 GroupId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return groupId; default: return default(Int32); } } set { groupId = value; } }
		private String name;
		public String Name { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (String)DbDataReader[1] : default(String); case WrapperMode.Dto: return name; default: return default(String); } } set { name = value; } }
		private String avatar;
		public String Avatar { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (String)DbDataReader[2] : default(String); case WrapperMode.Dto: return avatar; default: return default(String); } } set { avatar = value; } }
		private Int32 joinedUsers;
		public Int32 JoinedUsers { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (Int32)DbDataReader[3] : default(Int32); case WrapperMode.Dto: return joinedUsers; default: return default(Int32); } } set { joinedUsers = value; } }

		#endregion Properties

		public TChatGroup(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					groupId = (Int32)DbDataReader[0];
					name = DbDataReader[1] != DBNull.Value ? (String)DbDataReader[1] : default(String);
					avatar = DbDataReader[2] != DBNull.Value ? (String)DbDataReader[2] : default(String);
					joinedUsers = DbDataReader[3] != DBNull.Value ? (Int32)DbDataReader[3] : default(Int32);
					break;
			}
		}
	}

	#endregion [usp_get_t_chat_group]

	#region [usp_get_t_content]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_content
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TContent : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 contentId;
		public Int32 ContentId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return contentId; default: return default(Int32); } } set { contentId = value; } }
		private String title;
		public String Title { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (String)DbDataReader[1] : default(String); case WrapperMode.Dto: return title; default: return default(String); } } set { title = value; } }
		private String infoContent;
		public String InfoContent { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (String)DbDataReader[2] : default(String); case WrapperMode.Dto: return infoContent; default: return default(String); } } set { infoContent = value; } }

		#endregion Properties

		public TContent(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					contentId = (Int32)DbDataReader[0];
					title = DbDataReader[1] != DBNull.Value ? (String)DbDataReader[1] : default(String);
					infoContent = DbDataReader[2] != DBNull.Value ? (String)DbDataReader[2] : default(String);
					break;
			}
		}
	}

	#endregion [usp_get_t_content]

	#region [usp_get_t_course]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_course
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TCourse : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 courseId;
		public Int32 CourseId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return courseId; default: return default(Int32); } } set { courseId = value; } }
		private DateTime startDate;
		public DateTime StartDate { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (DateTime)DbDataReader[1] : default(DateTime); case WrapperMode.Dto: return startDate; default: return default(DateTime); } } set { startDate = value; } }
		private Int32 currentYear;
		public Int32 CurrentYear { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (Int32)DbDataReader[2] : default(Int32); case WrapperMode.Dto: return currentYear; default: return default(Int32); } } set { currentYear = value; } }
		private Int32 outstandingYears;
		public Int32 OutstandingYears { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (Int32)DbDataReader[3] : default(Int32); case WrapperMode.Dto: return outstandingYears; default: return default(Int32); } } set { outstandingYears = value; } }
		private Int32 completedSubjects;
		public Int32 CompletedSubjects { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[4] != DBNull.Value) ? (Int32)DbDataReader[4] : default(Int32); case WrapperMode.Dto: return completedSubjects; default: return default(Int32); } } set { completedSubjects = value; } }
		private Int32 outstandingSubjects;
		public Int32 OutstandingSubjects { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[5] != DBNull.Value) ? (Int32)DbDataReader[5] : default(Int32); case WrapperMode.Dto: return outstandingSubjects; default: return default(Int32); } } set { outstandingSubjects = value; } }
		private Int32 financialState;
		public Int32 FinancialState { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[6] != DBNull.Value) ? (Int32)DbDataReader[6] : default(Int32); case WrapperMode.Dto: return financialState; default: return default(Int32); } } set { financialState = value; } }
		private Int32 totalCredits;
		public Int32 TotalCredits { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[7] != DBNull.Value) ? (Int32)DbDataReader[7] : default(Int32); case WrapperMode.Dto: return totalCredits; default: return default(Int32); } } set { totalCredits = value; } }
		private String detailDescription;
		public String DetailDescription { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[8] != DBNull.Value) ? (String)DbDataReader[8] : default(String); case WrapperMode.Dto: return detailDescription; default: return default(String); } } set { detailDescription = value; } }
		private String requiredSubjects;
		public String RequiredSubjects { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[9] != DBNull.Value) ? (String)DbDataReader[9] : default(String); case WrapperMode.Dto: return requiredSubjects; default: return default(String); } } set { requiredSubjects = value; } }

		#endregion Properties

		public TCourse(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					courseId = (Int32)DbDataReader[0];
					startDate = DbDataReader[1] != DBNull.Value ? (DateTime)DbDataReader[1] : default(DateTime);
					currentYear = DbDataReader[2] != DBNull.Value ? (Int32)DbDataReader[2] : default(Int32);
					outstandingYears = DbDataReader[3] != DBNull.Value ? (Int32)DbDataReader[3] : default(Int32);
					completedSubjects = DbDataReader[4] != DBNull.Value ? (Int32)DbDataReader[4] : default(Int32);
					outstandingSubjects = DbDataReader[5] != DBNull.Value ? (Int32)DbDataReader[5] : default(Int32);
					financialState = DbDataReader[6] != DBNull.Value ? (Int32)DbDataReader[6] : default(Int32);
					totalCredits = DbDataReader[7] != DBNull.Value ? (Int32)DbDataReader[7] : default(Int32);
					detailDescription = DbDataReader[8] != DBNull.Value ? (String)DbDataReader[8] : default(String);
					requiredSubjects = DbDataReader[9] != DBNull.Value ? (String)DbDataReader[9] : default(String);
					break;
			}
		}
	}

	#endregion [usp_get_t_course]

	#region [usp_get_t_eid]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_eid
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TEid : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 institutionId;
		public Int32 InstitutionId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return institutionId; default: return default(Int32); } } set { institutionId = value; } }
		private String institutionName;
		public String InstitutionName { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (String)DbDataReader[1] : default(String); case WrapperMode.Dto: return institutionName; default: return default(String); } } set { institutionName = value; } }
		private DateTime startDate;
		public DateTime StartDate { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (DateTime)DbDataReader[2] : default(DateTime); case WrapperMode.Dto: return startDate; default: return default(DateTime); } } set { startDate = value; } }
		private DateTime endDate;
		public DateTime EndDate { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (DateTime)DbDataReader[3] : default(DateTime); case WrapperMode.Dto: return endDate; default: return default(DateTime); } } set { endDate = value; } }
		private String userId;
		public String UserId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[4] != DBNull.Value) ? (String)DbDataReader[4] : default(String); case WrapperMode.Dto: return userId; default: return default(String); } } set { userId = value; } }

		#endregion Properties

		public TEid(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					institutionId = (Int32)DbDataReader[0];
					institutionName = DbDataReader[1] != DBNull.Value ? (String)DbDataReader[1] : default(String);
					startDate = DbDataReader[2] != DBNull.Value ? (DateTime)DbDataReader[2] : default(DateTime);
					endDate = DbDataReader[3] != DBNull.Value ? (DateTime)DbDataReader[3] : default(DateTime);
					userId = DbDataReader[4] != DBNull.Value ? (String)DbDataReader[4] : default(String);
					break;
			}
		}
	}

	#endregion [usp_get_t_eid]

	#region [usp_get_t_feed]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_feed
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TFeed : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 feedId;
		public Int32 FeedId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return feedId; default: return default(Int32); } } set { feedId = value; } }
		private String feedIcon;
		public String FeedIcon { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (String)DbDataReader[1] : default(String); case WrapperMode.Dto: return feedIcon; default: return default(String); } } set { feedIcon = value; } }
		private String feedTitle;
		public String FeedTitle { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (String)DbDataReader[2] : default(String); case WrapperMode.Dto: return feedTitle; default: return default(String); } } set { feedTitle = value; } }
		private DateTime feedDate;
		public DateTime FeedDate { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (DateTime)DbDataReader[3] : default(DateTime); case WrapperMode.Dto: return feedDate; default: return default(DateTime); } } set { feedDate = value; } }
		private String userId;
		public String UserId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[4] != DBNull.Value) ? (String)DbDataReader[4] : default(String); case WrapperMode.Dto: return userId; default: return default(String); } } set { userId = value; } }
		private String feedContent;
		public String FeedContent { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[5] != DBNull.Value) ? (String)DbDataReader[5] : default(String); case WrapperMode.Dto: return feedContent; default: return default(String); } } set { feedContent = value; } }

		#endregion Properties

		public TFeed(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					feedId = (Int32)DbDataReader[0];
					feedIcon = DbDataReader[1] != DBNull.Value ? (String)DbDataReader[1] : default(String);
					feedTitle = DbDataReader[2] != DBNull.Value ? (String)DbDataReader[2] : default(String);
					feedDate = DbDataReader[3] != DBNull.Value ? (DateTime)DbDataReader[3] : default(DateTime);
					userId = DbDataReader[4] != DBNull.Value ? (String)DbDataReader[4] : default(String);
					feedContent = DbDataReader[5] != DBNull.Value ? (String)DbDataReader[5] : default(String);
					break;
			}
		}
	}

	#endregion [usp_get_t_feed]

	#region [usp_get_t_group]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_group
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TGroup : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 groupId;
		public Int32 GroupId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return groupId; default: return default(Int32); } } set { groupId = value; } }
		private String groupName;
		public String GroupName { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (String)DbDataReader[1] : default(String); case WrapperMode.Dto: return groupName; default: return default(String); } } set { groupName = value; } }

		#endregion Properties

		public TGroup(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					groupId = (Int32)DbDataReader[0];
					groupName = DbDataReader[1] != DBNull.Value ? (String)DbDataReader[1] : default(String);
					break;
			}
		}
	}

	#endregion [usp_get_t_group]

	#region [usp_get_t_message]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_message
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TMessage : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 messageId;
		public Int32 MessageId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return messageId; default: return default(Int32); } } set { messageId = value; } }
		private Int32 isPublic;
		public Int32 IsPublic { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (Int32)DbDataReader[1] : default(Int32); case WrapperMode.Dto: return isPublic; default: return default(Int32); } } set { isPublic = value; } }
		private DateTime messageTime;
		public DateTime MessageTime { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (DateTime)DbDataReader[2] : default(DateTime); case WrapperMode.Dto: return messageTime; default: return default(DateTime); } } set { messageTime = value; } }
		private DateTime messageDate;
		public DateTime MessageDate { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (DateTime)DbDataReader[3] : default(DateTime); case WrapperMode.Dto: return messageDate; default: return default(DateTime); } } set { messageDate = value; } }
		private Int32 userGroupId;
		public Int32 UserGroupId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[4] != DBNull.Value) ? (Int32)DbDataReader[4] : default(Int32); case WrapperMode.Dto: return userGroupId; default: return default(Int32); } } set { userGroupId = value; } }
		private String messageContent;
		public String MessageContent { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[5] != DBNull.Value) ? (String)DbDataReader[5] : default(String); case WrapperMode.Dto: return messageContent; default: return default(String); } } set { messageContent = value; } }

		#endregion Properties

		public TMessage(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					messageId = (Int32)DbDataReader[0];
					isPublic = DbDataReader[1] != DBNull.Value ? (Int32)DbDataReader[1] : default(Int32);
					messageTime = DbDataReader[2] != DBNull.Value ? (DateTime)DbDataReader[2] : default(DateTime);
					messageDate = DbDataReader[3] != DBNull.Value ? (DateTime)DbDataReader[3] : default(DateTime);
					userGroupId = DbDataReader[4] != DBNull.Value ? (Int32)DbDataReader[4] : default(Int32);
					messageContent = DbDataReader[5] != DBNull.Value ? (String)DbDataReader[5] : default(String);
					break;
			}
		}
	}

	#endregion [usp_get_t_message]

	#region [usp_get_t_previous_subjects]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_previous_subjects
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TPreviousSubjects : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 subjectId;
		public Int32 SubjectId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return subjectId; default: return default(Int32); } } set { subjectId = value; } }
		private String subjectName;
		public String SubjectName { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (String)DbDataReader[1] : default(String); case WrapperMode.Dto: return subjectName; default: return default(String); } } set { subjectName = value; } }
		private String subjectCode;
		public String SubjectCode { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (String)DbDataReader[2] : default(String); case WrapperMode.Dto: return subjectCode; default: return default(String); } } set { subjectCode = value; } }
		private String nqfLevel;
		public String NqfLevel { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (String)DbDataReader[3] : default(String); case WrapperMode.Dto: return nqfLevel; default: return default(String); } } set { nqfLevel = value; } }
		private String subjectResult;
		public String SubjectResult { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[4] != DBNull.Value) ? (String)DbDataReader[4] : default(String); case WrapperMode.Dto: return subjectResult; default: return default(String); } } set { subjectResult = value; } }
		private Int32 institutionId;
		public Int32 InstitutionId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[5] != DBNull.Value) ? (Int32)DbDataReader[5] : default(Int32); case WrapperMode.Dto: return institutionId; default: return default(Int32); } } set { institutionId = value; } }

		#endregion Properties

		public TPreviousSubjects(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					subjectId = (Int32)DbDataReader[0];
					subjectName = DbDataReader[1] != DBNull.Value ? (String)DbDataReader[1] : default(String);
					subjectCode = DbDataReader[2] != DBNull.Value ? (String)DbDataReader[2] : default(String);
					nqfLevel = DbDataReader[3] != DBNull.Value ? (String)DbDataReader[3] : default(String);
					subjectResult = DbDataReader[4] != DBNull.Value ? (String)DbDataReader[4] : default(String);
					institutionId = DbDataReader[5] != DBNull.Value ? (Int32)DbDataReader[5] : default(Int32);
					break;
			}
		}
	}

	#endregion [usp_get_t_previous_subjects]

	#region [usp_get_t_resource]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_resource
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TResource : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 resourceId;
		public Int32 ResourceId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return resourceId; default: return default(Int32); } } set { resourceId = value; } }
		private String contentLink;
		public String ContentLink { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (String)DbDataReader[1] : default(String); case WrapperMode.Dto: return contentLink; default: return default(String); } } set { contentLink = value; } }
		private String resourceType;
		public String ResourceType { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (String)DbDataReader[2] : default(String); case WrapperMode.Dto: return resourceType; default: return default(String); } } set { resourceType = value; } }
		private String description;
		public String Description { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (String)DbDataReader[3] : default(String); case WrapperMode.Dto: return description; default: return default(String); } } set { description = value; } }
		private String title;
		public String Title { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[4] != DBNull.Value) ? (String)DbDataReader[4] : default(String); case WrapperMode.Dto: return title; default: return default(String); } } set { title = value; } }
		private String icon;
		public String Icon { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[5] != DBNull.Value) ? (String)DbDataReader[5] : default(String); case WrapperMode.Dto: return icon; default: return default(String); } } set { icon = value; } }
		private Int32 subjectId;
		public Int32 SubjectId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[6] != DBNull.Value) ? (Int32)DbDataReader[6] : default(Int32); case WrapperMode.Dto: return subjectId; default: return default(Int32); } } set { subjectId = value; } }

		#endregion Properties

		public TResource(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					resourceId = (Int32)DbDataReader[0];
					contentLink = DbDataReader[1] != DBNull.Value ? (String)DbDataReader[1] : default(String);
					resourceType = DbDataReader[2] != DBNull.Value ? (String)DbDataReader[2] : default(String);
					description = DbDataReader[3] != DBNull.Value ? (String)DbDataReader[3] : default(String);
					title = DbDataReader[4] != DBNull.Value ? (String)DbDataReader[4] : default(String);
					icon = DbDataReader[5] != DBNull.Value ? (String)DbDataReader[5] : default(String);
					subjectId = DbDataReader[6] != DBNull.Value ? (Int32)DbDataReader[6] : default(Int32);
					break;
			}
		}
	}

	#endregion [usp_get_t_resource]

	#region [usp_get_t_subject]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_subject
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TSubject : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 subjectId;
		public Int32 SubjectId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return subjectId; default: return default(Int32); } } set { subjectId = value; } }
		private String subjectName;
		public String SubjectName { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (String)DbDataReader[1] : default(String); case WrapperMode.Dto: return subjectName; default: return default(String); } } set { subjectName = value; } }
		private String subjectIkon;
		public String SubjectIkon { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (String)DbDataReader[2] : default(String); case WrapperMode.Dto: return subjectIkon; default: return default(String); } } set { subjectIkon = value; } }
		private String subjectDescription;
		public String SubjectDescription { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (String)DbDataReader[3] : default(String); case WrapperMode.Dto: return subjectDescription; default: return default(String); } } set { subjectDescription = value; } }

		#endregion Properties

		public TSubject(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					subjectId = (Int32)DbDataReader[0];
					subjectName = DbDataReader[1] != DBNull.Value ? (String)DbDataReader[1] : default(String);
					subjectIkon = DbDataReader[2] != DBNull.Value ? (String)DbDataReader[2] : default(String);
					subjectDescription = DbDataReader[3] != DBNull.Value ? (String)DbDataReader[3] : default(String);
					break;
			}
		}
	}

	#endregion [usp_get_t_subject]

	#region [usp_get_t_subject_course]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_subject_course
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TSubjectCourse : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 subjectCourseId;
		public Int32 SubjectCourseId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return subjectCourseId; default: return default(Int32); } } set { subjectCourseId = value; } }
		private Int32 subjectId;
		public Int32 SubjectId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (Int32)DbDataReader[1] : default(Int32); case WrapperMode.Dto: return subjectId; default: return default(Int32); } } set { subjectId = value; } }
		private Int32 courseId;
		public Int32 CourseId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (Int32)DbDataReader[2] : default(Int32); case WrapperMode.Dto: return courseId; default: return default(Int32); } } set { courseId = value; } }

		#endregion Properties

		public TSubjectCourse(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					subjectCourseId = (Int32)DbDataReader[0];
					subjectId = DbDataReader[1] != DBNull.Value ? (Int32)DbDataReader[1] : default(Int32);
					courseId = DbDataReader[2] != DBNull.Value ? (Int32)DbDataReader[2] : default(Int32);
					break;
			}
		}
	}

	#endregion [usp_get_t_subject_course]

	#region [usp_get_t_user]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_user
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TUser : BaseDbDataReaderWrapper
	{
		#region Properties

		private String userId;
		public String UserId { get { switch(Mode){ case WrapperMode.Wrapper: return (String)DbDataReader[0]; case WrapperMode.Dto: return userId; default: return default(String); } } set { userId = value; } }
		private String firstName;
		public String FirstName { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (String)DbDataReader[1] : default(String); case WrapperMode.Dto: return firstName; default: return default(String); } } set { firstName = value; } }
		private String lastName;
		public String LastName { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (String)DbDataReader[2] : default(String); case WrapperMode.Dto: return lastName; default: return default(String); } } set { lastName = value; } }
		private String gender;
		public String Gender { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (String)DbDataReader[3] : default(String); case WrapperMode.Dto: return gender; default: return default(String); } } set { gender = value; } }
		private String email;
		public String Email { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[4] != DBNull.Value) ? (String)DbDataReader[4] : default(String); case WrapperMode.Dto: return email; default: return default(String); } } set { email = value; } }
		private String homeLanguage;
		public String HomeLanguage { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[5] != DBNull.Value) ? (String)DbDataReader[5] : default(String); case WrapperMode.Dto: return homeLanguage; default: return default(String); } } set { homeLanguage = value; } }
		private String nationality;
		public String Nationality { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[6] != DBNull.Value) ? (String)DbDataReader[6] : default(String); case WrapperMode.Dto: return nationality; default: return default(String); } } set { nationality = value; } }
		private DateTime dateOfBirth;
		public DateTime DateOfBirth { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[7] != DBNull.Value) ? (DateTime)DbDataReader[7] : default(DateTime); case WrapperMode.Dto: return dateOfBirth; default: return default(DateTime); } } set { dateOfBirth = value; } }
		private String homeAddress;
		public String HomeAddress { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[8] != DBNull.Value) ? (String)DbDataReader[8] : default(String); case WrapperMode.Dto: return homeAddress; default: return default(String); } } set { homeAddress = value; } }
		private String postalAddress;
		public String PostalAddress { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[9] != DBNull.Value) ? (String)DbDataReader[9] : default(String); case WrapperMode.Dto: return postalAddress; default: return default(String); } } set { postalAddress = value; } }
		private String city;
		public String City { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[10] != DBNull.Value) ? (String)DbDataReader[10] : default(String); case WrapperMode.Dto: return city; default: return default(String); } } set { city = value; } }
		private String country;
		public String Country { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[11] != DBNull.Value) ? (String)DbDataReader[11] : default(String); case WrapperMode.Dto: return country; default: return default(String); } } set { country = value; } }
		private String postalCode;
		public String PostalCode { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[12] != DBNull.Value) ? (String)DbDataReader[12] : default(String); case WrapperMode.Dto: return postalCode; default: return default(String); } } set { postalCode = value; } }
		private String medicalAid;
		public String MedicalAid { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[13] != DBNull.Value) ? (String)DbDataReader[13] : default(String); case WrapperMode.Dto: return medicalAid; default: return default(String); } } set { medicalAid = value; } }
		private String medicalNumber;
		public String MedicalNumber { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[14] != DBNull.Value) ? (String)DbDataReader[14] : default(String); case WrapperMode.Dto: return medicalNumber; default: return default(String); } } set { medicalNumber = value; } }
		private String ethnicGroup;
		public String EthnicGroup { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[15] != DBNull.Value) ? (String)DbDataReader[15] : default(String); case WrapperMode.Dto: return ethnicGroup; default: return default(String); } } set { ethnicGroup = value; } }
		private String disabilities;
		public String Disabilities { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[16] != DBNull.Value) ? (String)DbDataReader[16] : default(String); case WrapperMode.Dto: return disabilities; default: return default(String); } } set { disabilities = value; } }
		private String accountId;
		public String AccountId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[17] != DBNull.Value) ? (String)DbDataReader[17] : default(String); case WrapperMode.Dto: return accountId; default: return default(String); } } set { accountId = value; } }
		private String password;
		public String Password { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[18] != DBNull.Value) ? (String)DbDataReader[18] : default(String); case WrapperMode.Dto: return password; default: return default(String); } } set { password = value; } }
		private String question;
		public String Question { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[19] != DBNull.Value) ? (String)DbDataReader[19] : default(String); case WrapperMode.Dto: return question; default: return default(String); } } set { question = value; } }
		private String passcode;
		public String Passcode { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[20] != DBNull.Value) ? (String)DbDataReader[20] : default(String); case WrapperMode.Dto: return passcode; default: return default(String); } } set { passcode = value; } }
		private String status;
		public String Status { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[21] != DBNull.Value) ? (String)DbDataReader[21] : default(String); case WrapperMode.Dto: return status; default: return default(String); } } set { status = value; } }
		private String marketingMedium;
		public String MarketingMedium { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[22] != DBNull.Value) ? (String)DbDataReader[22] : default(String); case WrapperMode.Dto: return marketingMedium; default: return default(String); } } set { marketingMedium = value; } }
		private String marketingComment;
		public String MarketingComment { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[23] != DBNull.Value) ? (String)DbDataReader[23] : default(String); case WrapperMode.Dto: return marketingComment; default: return default(String); } } set { marketingComment = value; } }
		private DateTime marketingDateOfSubmission;
		public DateTime MarketingDateOfSubmission { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[24] != DBNull.Value) ? (DateTime)DbDataReader[24] : default(DateTime); case WrapperMode.Dto: return marketingDateOfSubmission; default: return default(DateTime); } } set { marketingDateOfSubmission = value; } }
		private String occupationStatus;
		public String OccupationStatus { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[25] != DBNull.Value) ? (String)DbDataReader[25] : default(String); case WrapperMode.Dto: return occupationStatus; default: return default(String); } } set { occupationStatus = value; } }
		private String highSchoolDetails;
		public String HighSchoolDetails { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[26] != DBNull.Value) ? (String)DbDataReader[26] : default(String); case WrapperMode.Dto: return highSchoolDetails; default: return default(String); } } set { highSchoolDetails = value; } }
		private String avatar;
		public String Avatar { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[27] != DBNull.Value) ? (String)DbDataReader[27] : default(String); case WrapperMode.Dto: return avatar; default: return default(String); } } set { avatar = value; } }
		private Int32 isOnline;
		public Int32 IsOnline { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[28] != DBNull.Value) ? (Int32)DbDataReader[28] : default(Int32); case WrapperMode.Dto: return isOnline; default: return default(Int32); } } set { isOnline = value; } }
		private String profileStatus;
		public String ProfileStatus { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[29] != DBNull.Value) ? (String)DbDataReader[29] : default(String); case WrapperMode.Dto: return profileStatus; default: return default(String); } } set { profileStatus = value; } }
		private String cellPhone;
		public String CellPhone { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[30] != DBNull.Value) ? (String)DbDataReader[30] : default(String); case WrapperMode.Dto: return cellPhone; default: return default(String); } } set { cellPhone = value; } }
		private Boolean isActive;
		public Boolean IsActive { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[31] != DBNull.Value) ? (Boolean)DbDataReader[31] : default(Boolean); case WrapperMode.Dto: return isActive; default: return default(Boolean); } } set { isActive = value; } }
		private String familyType;
		public String FamilyType { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[32] != DBNull.Value) ? (String)DbDataReader[32] : default(String); case WrapperMode.Dto: return familyType; default: return default(String); } } set { familyType = value; } }
		private String familyId;
		public String FamilyId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[33] != DBNull.Value) ? (String)DbDataReader[33] : default(String); case WrapperMode.Dto: return familyId; default: return default(String); } } set { familyId = value; } }

		#endregion Properties

		public TUser(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					userId = (String)DbDataReader[0];
					firstName = DbDataReader[1] != DBNull.Value ? (String)DbDataReader[1] : default(String);
					lastName = DbDataReader[2] != DBNull.Value ? (String)DbDataReader[2] : default(String);
					gender = DbDataReader[3] != DBNull.Value ? (String)DbDataReader[3] : default(String);
					email = DbDataReader[4] != DBNull.Value ? (String)DbDataReader[4] : default(String);
					homeLanguage = DbDataReader[5] != DBNull.Value ? (String)DbDataReader[5] : default(String);
					nationality = DbDataReader[6] != DBNull.Value ? (String)DbDataReader[6] : default(String);
					dateOfBirth = DbDataReader[7] != DBNull.Value ? (DateTime)DbDataReader[7] : default(DateTime);
					homeAddress = DbDataReader[8] != DBNull.Value ? (String)DbDataReader[8] : default(String);
					postalAddress = DbDataReader[9] != DBNull.Value ? (String)DbDataReader[9] : default(String);
					city = DbDataReader[10] != DBNull.Value ? (String)DbDataReader[10] : default(String);
					country = DbDataReader[11] != DBNull.Value ? (String)DbDataReader[11] : default(String);
					postalCode = DbDataReader[12] != DBNull.Value ? (String)DbDataReader[12] : default(String);
					medicalAid = DbDataReader[13] != DBNull.Value ? (String)DbDataReader[13] : default(String);
					medicalNumber = DbDataReader[14] != DBNull.Value ? (String)DbDataReader[14] : default(String);
					ethnicGroup = DbDataReader[15] != DBNull.Value ? (String)DbDataReader[15] : default(String);
					disabilities = DbDataReader[16] != DBNull.Value ? (String)DbDataReader[16] : default(String);
					accountId = DbDataReader[17] != DBNull.Value ? (String)DbDataReader[17] : default(String);
					password = DbDataReader[18] != DBNull.Value ? (String)DbDataReader[18] : default(String);
					question = DbDataReader[19] != DBNull.Value ? (String)DbDataReader[19] : default(String);
					passcode = DbDataReader[20] != DBNull.Value ? (String)DbDataReader[20] : default(String);
					status = DbDataReader[21] != DBNull.Value ? (String)DbDataReader[21] : default(String);
					marketingMedium = DbDataReader[22] != DBNull.Value ? (String)DbDataReader[22] : default(String);
					marketingComment = DbDataReader[23] != DBNull.Value ? (String)DbDataReader[23] : default(String);
					marketingDateOfSubmission = DbDataReader[24] != DBNull.Value ? (DateTime)DbDataReader[24] : default(DateTime);
					occupationStatus = DbDataReader[25] != DBNull.Value ? (String)DbDataReader[25] : default(String);
					highSchoolDetails = DbDataReader[26] != DBNull.Value ? (String)DbDataReader[26] : default(String);
					avatar = DbDataReader[27] != DBNull.Value ? (String)DbDataReader[27] : default(String);
					isOnline = DbDataReader[28] != DBNull.Value ? (Int32)DbDataReader[28] : default(Int32);
					profileStatus = DbDataReader[29] != DBNull.Value ? (String)DbDataReader[29] : default(String);
					cellPhone = DbDataReader[30] != DBNull.Value ? (String)DbDataReader[30] : default(String);
					isActive = DbDataReader[31] != DBNull.Value ? (Boolean)DbDataReader[31] : default(Boolean);
					familyType = DbDataReader[32] != DBNull.Value ? (String)DbDataReader[32] : default(String);
					familyId = DbDataReader[33] != DBNull.Value ? (String)DbDataReader[33] : default(String);
					break;
			}
		}
	}

	#endregion [usp_get_t_user]

	#region [usp_get_t_user_assignment]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_user_assignment
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TUserAssignment : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 userAssignmentId;
		public Int32 UserAssignmentId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return userAssignmentId; default: return default(Int32); } } set { userAssignmentId = value; } }
		private Int32 mark;
		public Int32 Mark { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (Int32)DbDataReader[1] : default(Int32); case WrapperMode.Dto: return mark; default: return default(Int32); } } set { mark = value; } }
		private DateTime submitDate;
		public DateTime SubmitDate { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (DateTime)DbDataReader[2] : default(DateTime); case WrapperMode.Dto: return submitDate; default: return default(DateTime); } } set { submitDate = value; } }
		private String downloadFile;
		public String DownloadFile { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (String)DbDataReader[3] : default(String); case WrapperMode.Dto: return downloadFile; default: return default(String); } } set { downloadFile = value; } }
		private String uploadFile;
		public String UploadFile { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[4] != DBNull.Value) ? (String)DbDataReader[4] : default(String); case WrapperMode.Dto: return uploadFile; default: return default(String); } } set { uploadFile = value; } }
		private String userId;
		public String UserId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[5] != DBNull.Value) ? (String)DbDataReader[5] : default(String); case WrapperMode.Dto: return userId; default: return default(String); } } set { userId = value; } }
		private Int32 assignmentId;
		public Int32 AssignmentId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[6] != DBNull.Value) ? (Int32)DbDataReader[6] : default(Int32); case WrapperMode.Dto: return assignmentId; default: return default(Int32); } } set { assignmentId = value; } }

		#endregion Properties

		public TUserAssignment(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					userAssignmentId = (Int32)DbDataReader[0];
					mark = DbDataReader[1] != DBNull.Value ? (Int32)DbDataReader[1] : default(Int32);
					submitDate = DbDataReader[2] != DBNull.Value ? (DateTime)DbDataReader[2] : default(DateTime);
					downloadFile = DbDataReader[3] != DBNull.Value ? (String)DbDataReader[3] : default(String);
					uploadFile = DbDataReader[4] != DBNull.Value ? (String)DbDataReader[4] : default(String);
					userId = DbDataReader[5] != DBNull.Value ? (String)DbDataReader[5] : default(String);
					assignmentId = DbDataReader[6] != DBNull.Value ? (Int32)DbDataReader[6] : default(Int32);
					break;
			}
		}
	}

	#endregion [usp_get_t_user_assignment]

	#region [usp_get_t_user_chat_group]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_user_chat_group
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TUserChatGroup : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 userChatGroupId;
		public Int32 UserChatGroupId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return userChatGroupId; default: return default(Int32); } } set { userChatGroupId = value; } }
		private String userId;
		public String UserId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (String)DbDataReader[1] : default(String); case WrapperMode.Dto: return userId; default: return default(String); } } set { userId = value; } }
		private Int32 chatGroupId;
		public Int32 ChatGroupId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (Int32)DbDataReader[2] : default(Int32); case WrapperMode.Dto: return chatGroupId; default: return default(Int32); } } set { chatGroupId = value; } }

		#endregion Properties

		public TUserChatGroup(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					userChatGroupId = (Int32)DbDataReader[0];
					userId = DbDataReader[1] != DBNull.Value ? (String)DbDataReader[1] : default(String);
					chatGroupId = DbDataReader[2] != DBNull.Value ? (Int32)DbDataReader[2] : default(Int32);
					break;
			}
		}
	}

	#endregion [usp_get_t_user_chat_group]

	#region [usp_get_t_user_group]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_user_group
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TUserGroup : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 userGroupId;
		public Int32 UserGroupId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return userGroupId; default: return default(Int32); } } set { userGroupId = value; } }
		private String userId;
		public String UserId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (String)DbDataReader[1] : default(String); case WrapperMode.Dto: return userId; default: return default(String); } } set { userId = value; } }
		private Int32 groupId;
		public Int32 GroupId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (Int32)DbDataReader[2] : default(Int32); case WrapperMode.Dto: return groupId; default: return default(Int32); } } set { groupId = value; } }

		#endregion Properties

		public TUserGroup(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					userGroupId = (Int32)DbDataReader[0];
					userId = DbDataReader[1] != DBNull.Value ? (String)DbDataReader[1] : default(String);
					groupId = DbDataReader[2] != DBNull.Value ? (Int32)DbDataReader[2] : default(Int32);
					break;
			}
		}
	}

	#endregion [usp_get_t_user_group]

	#region [usp_get_t_user_subject]

	/// <summary>
	///This class is a wrapper around a DbDataReader,
	///Associated with the stored procedure - usp_get_t_user_subject
	///This class provides a strongly typed interface to access data from the DbDataReader.
	///containing the result of the given stored procedure.
	/// </summary>
	public sealed class TUserSubject : BaseDbDataReaderWrapper
	{
		#region Properties

		private Int32 userSubjectId;
		public Int32 UserSubjectId { get { switch(Mode){ case WrapperMode.Wrapper: return (Int32)DbDataReader[0]; case WrapperMode.Dto: return userSubjectId; default: return default(Int32); } } set { userSubjectId = value; } }
		private Boolean isComplete;
		public Boolean IsComplete { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[1] != DBNull.Value) ? (Boolean)DbDataReader[1] : default(Boolean); case WrapperMode.Dto: return isComplete; default: return default(Boolean); } } set { isComplete = value; } }
		private Decimal subjectMark;
		public Decimal SubjectMark { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[2] != DBNull.Value) ? (Decimal)DbDataReader[2] : default(Decimal); case WrapperMode.Dto: return subjectMark; default: return default(Decimal); } } set { subjectMark = value; } }
		private String userId;
		public String UserId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[3] != DBNull.Value) ? (String)DbDataReader[3] : default(String); case WrapperMode.Dto: return userId; default: return default(String); } } set { userId = value; } }
		private Int32 subjectId;
		public Int32 SubjectId { get { switch(Mode){ case WrapperMode.Wrapper: return (DbDataReader[4] != DBNull.Value) ? (Int32)DbDataReader[4] : default(Int32); case WrapperMode.Dto: return subjectId; default: return default(Int32); } } set { subjectId = value; } }

		#endregion Properties

		public TUserSubject(DbDataReader dbDataReader, WrapperMode mode)
			:base(dbDataReader, mode)
		{
			switch(Mode)
			{
				case WrapperMode.Wrapper:
					break;
				case WrapperMode.Dto:
					userSubjectId = (Int32)DbDataReader[0];
					isComplete = DbDataReader[1] != DBNull.Value ? (Boolean)DbDataReader[1] : default(Boolean);
					subjectMark = DbDataReader[2] != DBNull.Value ? (Decimal)DbDataReader[2] : default(Decimal);
					userId = DbDataReader[3] != DBNull.Value ? (String)DbDataReader[3] : default(String);
					subjectId = DbDataReader[4] != DBNull.Value ? (Int32)DbDataReader[4] : default(Int32);
					break;
			}
		}
	}

	#endregion [usp_get_t_user_subject]

}
